//
//  LSZMyPointsManager.m
//  PartyClassCloud
//
//  Created by 梁素珍 on 2018/9/2.
//  Copyright © 2018年 九酷. All rights reserved.
//

#import "LSZMyPointsManager.h"

@implementation LSZMyPointsManager
-(id)initWithMyPoints:(NSDictionary *)diction
{
    self = [super init];
    if (self) {
        self.arrayData = [[NSMutableArray alloc]init];
        self.scoreRanking = diction[@"index"][@"score"];
        self.totalScore = [[NSString alloc]init];
        NSMutableArray * customerScores = diction[@"customerScores"];
        NSMutableArray * mutArray =[[NSMutableArray alloc]init];
        NSInteger total_score = 0;
        for (NSDictionary * dic in customerScores) {
            LSZMyPointsMg * mg = [[LSZMyPointsMg alloc]init];
            mg.name = NullStringjudgment(NSStr(dic[@"name"]));
            mg.score = NullStringjudgment(NSStr(dic[@"score"]));
            [mutArray addObject:mg];
            total_score = total_score + [dic[@"score"] integerValue];
        }
        self.totalScore = [NSString stringWithFormat:@"%ld",(long)total_score];
        self.arrayData = mutArray;
    }
    return self;
}
@end
@implementation LSZMyPointsMg
@end
